<?php
class model{
	var $db;

	function __construct(){
		$this->db = &$GLOBALS['db'];	
	}
	
	function __destruct(){
		if($this->db)
			unset($this->db);	
	}	
}
?>